package com.vf.admin.miaodong.service.impl;

import com.vf.admin.common.splitpage.SplitPageBean;
import com.vf.admin.miaodong.dao.AfterUserLaHeiDao;
import com.vf.admin.miaodong.entity.AppUserLaHei;
import com.vf.admin.miaodong.service.AfterUserLaHeiService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * @author anxiang
 * @version 1.0.0
 * @ClassName AfterUserLaHeiServiceImpl.java
 * @Description 用户拉黑用户
 * @createTime 2021年07月29日 09:14:00
 */
@Service
public class AfterUserLaHeiServiceImpl implements AfterUserLaHeiService {

    @Autowired
    AfterUserLaHeiDao afterUserLaHeiDao;

    /**
     * 新增/更新
     * @param appUserLaHei
     */
    @Override
    public void saveOrUpdate(AppUserLaHei appUserLaHei) {
        afterUserLaHeiDao.saveOrUpdate(appUserLaHei);
    }

    /**
     * 综合查询
     * @param paramap
     * @param splitPageBean
     * @return
     */
    @Override
    public List<AppUserLaHei> findList(Map<String, Object> paramap, SplitPageBean splitPageBean) {
        return afterUserLaHeiDao.findList(paramap, splitPageBean);
    }

    /**
     * 根据用户id和被拉黑用户ID查询拉黑信息
     * @param userid
     * @param lhuserid
     * @return
     */
    @Override
    public AppUserLaHei getByUseridAndLhUserid(Integer userid, Integer lhuserid) {
        return afterUserLaHeiDao.getByUseridAndLhUserid(userid, lhuserid);
    }

    /**
     * 删除
     * @param id
     */
    @Override
    public void delete(Integer id) {
        afterUserLaHeiDao.delete(id);
    }
}